// public
// private
// protected
class Person {
    public name: string
    public age: number

    constructor(name: string, age: number) {
        this.name = name
        this.age = age
    }
    // 方法变成私有方法：只有在类的内部才能访问
    private eating() {
        console.log("吃东西")
    }

}

const p = new Person("why", 18)
console.log(p.name, p.age)
p.name = "kobe"
// p.eating()

export { }